package classwork.demo1;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class JdbcDemo6 {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");

        Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/db2", "root", "root");
        Statement st = con.createStatement();

       // int i = st.executeUpdate("insert into stu values ('3','王五','7777')");
        st.executeUpdate("update stu set id='1' where name='张三' ");
    }
}
